package com.usian.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.io.Serializable;
import java.util.Date;

@Table(name = "yuan")
public class Yuan implements Serializable {


	@Id
	@TableId(value = "id",type = IdType.AUTO)
	@Column(name = "id")
	private Integer id;

	@Column(name = "name")
	private String name;

	@Column(name = "sex")
	private String sex;

	@Column(name = "birth")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date birth;

	@Column(name = "ru")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date ru;

	@Column(name = "xue")
	private String xue;

	@Column(name = "zhi")
	private Integer zhi;

	@Column(name = "phone")
	private String phone;

	@Column(name = "bu")
	private Integer bu;


	public Yuan() {
	}

	public Yuan(Integer id, String name, String sex, Date birth, Date ru, String xue, Integer zhi, String phone, Integer bu) {	
		this.id = id;
		this.name = name;
		this.sex = sex;
		this.birth = birth;
		this.ru = ru;
		this.xue = xue;
		this.zhi = zhi;
		this.phone = phone;
		this.bu = bu;
	}


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Date getBirth() {
		return birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	public Date getRu() {
		return ru;
	}

	public void setRu(Date ru) {
		this.ru = ru;
	}

	public String getXue() {
		return xue;
	}

	public void setXue(String xue) {
		this.xue = xue;
	}

	public Integer getZhi() {
		return zhi;
	}

	public void setZhi(Integer zhi) {
		this.zhi = zhi;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Integer getBu() {
		return bu;
	}

	public void setBu(Integer bu) {
		this.bu = bu;
	}


	@Override
	public String toString() {
		return "Yuan{" +
				"id='" + id + '\'' +
				"name='" + name + '\'' +
				"sex='" + sex + '\'' +
				"birth='" + birth + '\'' +
				"ru='" + ru + '\'' +
				"xue='" + xue + '\'' +
				"zhi='" + zhi + '\'' +
				"phone='" + phone + '\'' +
				"bu='" + bu + '\'' +
				'}';
	}

}
